<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.time.php';
require '../core/core.jobs.php';
$login=new core_security;
if ($login->checklogin()=="OK") {
$time=new core_time;

$time->time=$_POST['value'];
//echo $time->verify_time_format_wodate();
if ($time->verify_time_format_wodate()=="") {
$job=new core_job;
$job->id=$_POST['id'];

$job->to=$time->totimestampdef($_SESSION['date2'],$_POST['value']);
$job->edit_validate();
$job->duration=$job->to - $job->from;
echo $job->edit_validate();


//$job->edit();	
//echo $_POST['value'];
	} else {
	echo $time->verify_time_format_wodate();
	}
	//echo $_POST['value'];
}
